package com.ybkj.daijia.server.scheduler;

import com.ybkj.daijia.server.service.SuperviceService;
import com.ybkj.daijia.server.sp.ShenZhenTimer;
import java.text.ParseException;
import java.util.Date;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * 定时上传深圳监管平台日期信息
 *
 * @author jacklee
 */
@Component
public class ShenZhenWorkTimer {

    @Autowired
    private SuperviceService superviceService;

    @Transactional(rollbackFor = Exception.class)
    public void uploadDate() {

        ShenZhenTimer shenzhenTimer = new ShenZhenTimer();

        Date startTime = null;
        Date endTime = new Date();
        try {
            startTime = DateUtils.parseDate("2000-08-10 00:00:00", "yyyy-MM-dd HH:mm:ss");
        } catch (ParseException e) {

            e.printStackTrace();
        }

        shenzhenTimer.setStartTime(startTime);
        shenzhenTimer.setEndTime(endTime);

        //superviceService.shenzhenTimer(shenzhenTimer);

    }

}
